package com.example.bingobox.data;

import android.content.Context;
import android.widget.Toast;
import android.os.Environment;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.example.bingobox.data.model.Label;
import com.example.bingobox.data.model.TodoBoxData;

public class DataInitializer {
    private final Context context;
    private final Gson gson;

    private final StateInitializer stateInitializer;
    private final TodoboxInitializer todoboxInitializer;

    public DataInitializer(Context context) {
        this.context = context;
        this.gson = new GsonBuilder().setPrettyPrinting().create();
        this.stateInitializer = new StateInitializer();
        this.todoboxInitializer = new TodoboxInitializer();
    }

    // 初始化状态数据文件
    public void initStateFile(File dataDir) {
        stateInitializer.initialize(context, dataDir);
    }

    // 初始化待办数据文件
    public void initTodoboxFile(File dataDir) {
        todoboxInitializer.initialize(context, dataDir);
    }

}